<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>编辑邮件</title>
<link href="/widget/bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet"  type="text/css"/>
 {cssjs}
<link href="/res/css/inside_page.css" rel="stylesheet"  type="text/css"/>
<style>
    #attachment_box{height: 36px;line-height: 36px}
	#attachment_box .attachment_one{display: inline-block;margin-right: 5px;color: #6C9EC0;}
	#attachment_box .attachment_one_del{display: inline-block;margin-right: 15px;color: #c00;}
	.layui-upload-button{float: left;width: 150px;}
	#attachment_box{float: left;width: 78%;margin-left: 20px;}
</style>
</head>
<body>
<div class="container-fluid larry-wrapper">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <section class="panel panel-padding">
            	<form id="form1" class="layui-form layui-form-pane">               
			    <div class="layui-form-item">
                    <label class="layui-form-label">公告对象：</label>
                    <div class="layui-input-block">
                        <input readonly placeholder="公告对象" title="" id="acceptschname" value="{acceptschname}" name="acceptschname" class="layui-input" type="text" autocomplete="off" style="display: inline-block;width: 85%;">
                        <input name="acceptsch_id" id="acceptsch_id" value="" type="text" style="display: none;">
                        <a class="layui-btn" id="receiver_select" style="display: inline-block;">选择</a>
                    </div>
                </div>
			    <div class="layui-form-item">
                    <label class="layui-form-label">附&nbsp;&nbsp;&nbsp;件：</label>
                    <div class="layui-input-block">
                        <input type="file" id="upload_attachment" name="upload_attachment[]" multiple="true" lay-type="file" class="layui-upload-file"> 
                        <div id="attachment_box">
                        	{attachment_html}
                        </div>
                        <input name="attachment" id="attachment" value='{attachment_arr}' type="text" style="display: none;">
                    </div>
                </div>              
				<textarea class="layui-textarea"  name="content" id="content" style="display: none"></textarea>
                <div class="layui-form-item"></div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <input type="button" id="btn_save" value="立即发送" class="layui-btn" />
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
				</form>				
            </section>
        </div>
    </div>
</div>
    {jsmodel}
   <script type="text/javascript">
        layui.use('announce_edit');
        $("#receiver_select").click(function(){
        	var index = parent.layer.getFrameIndex(window.name);//获取当前弹出层的ID
        	var schid=$("#acceptsch_id").val();
	    	parent.layer.open({
	            type: 2,
	            title: '选择公告对象',
	            shadeClose: false,
	            shade: 0.8,
	            area: ['100%', '100%'],
	            full:true,
	            content: './?t=select_acceptsch&fid='+index+'&schid='+schid //iframe的url
	        }); 
	    })
    </script>
</body>
</html>